package com.gzist.blog_system.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.gzist.blog_system.domain.Comment;
import com.gzist.blog_system.domain.result.PageBean;
import com.gzist.blog_system.domain.vo.CommentPageVO;

import java.util.List;

/**
 *
 */
public interface CommentService extends IService<Comment> {

    /*
     * @description:
     *  分页查询某篇文章的评论
     * @param: [CommentPageVO]
     **/
    PageBean<Comment> queryPage(CommentPageVO commentPageVO);

    /*
     * @description:
     *  后台查询最新的几条评论
     * @param: []
     **/
    List<Comment> getNewComment();

    /*
     * @description:
     *  发布评论
     * @param: [Comment]
     **/
    boolean pushComment(Comment comment);

    /*
     * @description:
     *  统计评论数量
     * @param: [Comment]
     **/
    Long countComment();

    /*
     * @description:
     *  删除评论根据文章id
     * @param: [Comment]
     **/
    boolean deleteComment(Long id);
}
